﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class  Contenu
    {
        protected string _titre;
        protected string _description;
        protected int _reference;
        protected string _type;
        protected List<string> _champs;

        public Contenu()
        {
            _champs = new List<string>();
            setDefaultChamps();
        }

        public string Titre
        {
            get { return _titre; }
            set { _titre = value; }
        }

        public string Description
        {
            get { return _description; }
            set { _description = value; }
        }

        public string Type
        {
            get { return _type; }
            set { _type = value; }
        }

        public int Reference
        {
            get { return _reference; }
            set { _reference = value; }
        }

        public List<string> Champs
        {
            get { return _champs; }
            set { _champs = value; }
        }

        protected void setDefaultChamps()
        {
            _champs.Add("titre");
            _champs.Add("type");
            _champs.Add("description"); 
        }

        public string toString()
        {
            return Titre + "\n" + Description +"\n" + Reference;
        }
        
    }
}
